  //index.js
//获取应用实例
var app = getApp()
var util = require('../../utils/util.js')
Page({
  data: {
    id:null,
  },
  onLoad: function (e) {
    console.log(e)
    var lang = wx.T.getLanguage()
    this.setData({
      id:e.id,
      pic:e.pic,
      num: e.num,
      name:e.name,
      language: lang,
      selectSize: lang.select_attribute,
      company_code:e.company_code,
      tracking_number:e.tracking_number,
      tracking_company:e.tracking_company

    });
    
    var that = this;
    var orderId = e.id;
    var numberId = e.number;
    if (app.globalData.iphone == true) { that.setData({ iphone: 'iphone' }) };
  
    // 查看物流信息
    this.showLogs();

  },
  // 复制文本
  copyText(e){
    util.copyText(e.currentTarget.dataset.content);
  },
  // 查看物流信息
  showLogs(){
    console.log("查看物流信息",this)
    let that=this;
    wx.request({
      url: app.globalData.urls + '/order/express-data',///order/express
      method: "POST",
      data: {
        // item_id: this.data.id
        tracking_number:that.data.tracking_number,
        company_code:that.data.company_code,
      },
      success: function (res) {
        let result = res.data.data;
        if(res.data.code==200){
       
          that.setData({
            maliwiliuList: result
          })
        }
      }
    });
  },

})
